﻿namespace WMS6.Web.MessageServiceRef
{
    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;
    using System.Runtime.Serialization;

    [Serializable, DataContract(Name="UserUnreadMessageInfo", Namespace="http://schemas.datacontract.org/2004/07/WMS6.DataEntity"), GeneratedCode("System.Runtime.Serialization", "3.0.0.0"), DebuggerStepThrough]
    public class UserUnreadMessageInfo : IExtensibleDataObject, INotifyPropertyChanged
    {
        [NonSerialized]
        private ExtensionDataObject extensionDataField;
        [OptionalField]
        private string FromUserIDField;
        [OptionalField]
        private string MessageContentField;
        [OptionalField]
        private string MessageTitleField;
        [OptionalField]
        private int RowIDField;
        [OptionalField]
        private int UnreadQtyField;
        [OptionalField]
        private DateTime UpdatedDateField;

        public event PropertyChangedEventHandler PropertyChanged;

        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        [Browsable(false)]
        public ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [DataMember]
        public string FromUserID
        {
            get
            {
                return this.FromUserIDField;
            }
            set
            {
                if (!object.ReferenceEquals(this.FromUserIDField, value))
                {
                    this.FromUserIDField = value;
                    this.RaisePropertyChanged("FromUserID");
                }
            }
        }

        [DataMember]
        public string MessageContent
        {
            get
            {
                return this.MessageContentField;
            }
            set
            {
                if (!object.ReferenceEquals(this.MessageContentField, value))
                {
                    this.MessageContentField = value;
                    this.RaisePropertyChanged("MessageContent");
                }
            }
        }

        [DataMember]
        public string MessageTitle
        {
            get
            {
                return this.MessageTitleField;
            }
            set
            {
                if (!object.ReferenceEquals(this.MessageTitleField, value))
                {
                    this.MessageTitleField = value;
                    this.RaisePropertyChanged("MessageTitle");
                }
            }
        }

        [DataMember]
        public int RowID
        {
            get
            {
                return this.RowIDField;
            }
            set
            {
                if (!this.RowIDField.Equals(value))
                {
                    this.RowIDField = value;
                    this.RaisePropertyChanged("RowID");
                }
            }
        }

        [DataMember]
        public int UnreadQty
        {
            get
            {
                return this.UnreadQtyField;
            }
            set
            {
                if (!this.UnreadQtyField.Equals(value))
                {
                    this.UnreadQtyField = value;
                    this.RaisePropertyChanged("UnreadQty");
                }
            }
        }

        [DataMember]
        public DateTime UpdatedDate
        {
            get
            {
                return this.UpdatedDateField;
            }
            set
            {
                if (!this.UpdatedDateField.Equals(value))
                {
                    this.UpdatedDateField = value;
                    this.RaisePropertyChanged("UpdatedDate");
                }
            }
        }
    }
}

